﻿namespace ePubReader
{
    public class Package
    {
        public Package(double version, Metadata metadata, Item[] manifest, ItemRef[] spine, Guide guide)
        {
            this.Version = version;
            this.Metadata = metadata;
            this.Manifest = manifest;
            this.Spine = spine;
            this.Guide = guide;

            if (this.Manifest == null)
            {
                this.Manifest = new Item[0];
            }

            if (this.Spine == null)
            {
                this.Spine = new ItemRef[0];
            }

            if (this.Guide == null)
            {
                this.Guide = new Guide();
            }
        }

        public double Version { get; private set; }

        public Metadata Metadata { get; private set; }

        public Item[] Manifest { get; private set; }

        public ItemRef[] Spine { get; private set; }

        public Guide Guide { get; private set; }
    }

}
